<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>对话框</title>
    <style>
      .box {
        position: relative;
        width: 300px;
        height: 100px;
        background-color: palevioletred;
      }

      .box .triangle {
        position: absolute;
        top: 50%;
        margin-top: -15px;
        right: -30px;
        width: 0;
        height: 0;
        border: 15px solid red;
        border-left: 30px solid palevioletred;
        border-right: 0;
        border-color: transparent transparent transparent palevioletred;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="triangle"></div>
    </div>
  </body>
</html>
